/** * @license * Copyright 2017 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { AaiSchema, Node, OasSchema } from "apicurio-data-models"; import { ApiEditorUser } from "../../../../../models/editor-user.model"; export declare class ModelUtils { /** * Converts a node into a nodepath. * @param node */ static nodeToPath(node: Node): string; /** * Clears any possible selection that may exist on the given node for the local user. * @param node */ static clearSelection(node: Node): void; /** * Sets the local selection on the node. Essentially this marks the node as "selected" * for the local user. * @param node */ static setSelection(node: Node): void; /** * Checks whether the given item is selected by the local user. * @param node * @return */ static isSelected(node: Node): boolean; /** * Clears any possible selection that may exist on the given node for the given user. * @param user * @param node */ static clearCollaboratorSelection(user: ApiEditorUser, node: Node): void; /** * Sets the collaborator selection for the given user on the node. Essentially this marks * the node as "selected" by the external (active) collaborator. * @param user * @param node */ static setCollaboratorSelection(user: ApiEditorUser, node: Node): void; /** * Checks whether the given item is selected by an external collaborator. Returns the collaborator * information if the item is selected or else null. * @param node * @return */ static isSelectedByCollaborator(node: Node): ApiEditorUser; /** * Generates an example from the given schema. * @param schema */ static generateExampleFromSchema(schema: OasSchema | AaiSchema): any; } export declare class ExampleGenerator { private refStack; generate(schema: OasSchema | AaiSchema): any; private generateFromRef; private generateObject; private generateArray; private isSimpleType; private isEnum; private generateEnumValue; private generateSimpleType; }